package com.qianjun.hadoop.star;

import java.io.IOException;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

public class Star {

	public static class ActorMapper extends Mapper<LongWritable, Text, Text, Text>{
		
		
		@Override
		public void map(LongWritable key, Text value, Context context)
				throws IOException, InterruptedException {


			String[] tokens = value.toString().split("\t");
			String gender = tokens[1];
			String nameHotIndex = tokens[0]+"\t"+tokens[2];
			context.write(new Text(gender), new Text(nameHotIndex));
			
			
		}
	}
	
	
	
	
	
}
